import request from 'api/request'

export function addSort(data) {
  return request({
    url: '/sort/add',
    method: 'post',
    data
  })
}

export function getSort(data) {
  return request({
    url: '/sort/list',
    method: 'post',
    data
  })
}

export function updateSort(id, data) {
  return request({
    url: `/sort/update/${id}`,
    method: 'patch',
    data
  })
}

export function delSort(id) {
  return request({
    url: '/sort/del',
    method: 'get',
    params: { id }
  })
}
